// import com.alibaba.druid.sql.ast.SQLStatement;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

#include "SQLCostStatement.h"
#include "../../visitor/SQLASTVisitor.h"

SQLStatement_ptr SQLCostStatement::getStatement()
{
  return statement;
}

void SQLCostStatement::setStatement(SQLStatement_ptr statement)
{
  if (statement != nullptr)
  {
    statement->setParent(SharedObject(SQLCostStatement));
  }

  this->statement = statement;
}

// @Override
void SQLCostStatement::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLCostStatement)))
  {
    acceptChild(visitor, statement);
  }
  visitor->endVisit(SharedObject(SQLCostStatement));
}
